classdef ExmData < handle 
    %ExmData Example to show properties and methods
    %   We 'inherit' from 'handle'.  In practice, this allows us to 
    %   modify and save the object properties.  
    %   Read about 'Value' and 'Handle' classes: doc handle
    %   doc 'comparing-handle-and-value'
    
    
    properties
        A=5
        B
        C
    end
    
    methods
        
        %These look just like functions in a *.m file, but the 0first input must
        %be 'obj', which is the object used to call the method.  
        
        function addAB(obj)
            %Calculate something from object properties and save result to
            %object property
            obj.C=obj.A+obj.B;
        end
        
        function multAB(obj)
            obj.C=obj.A*obj.B;
            %Calculate something from object properties and save result to
            %object property
        end
        
        
    end
    
end

